package com.tamtamy.jtta.data.xml;

import org.w3c.dom.Document;

import com.tamtamy.jtta.data.User;
import com.tamtamy.jtta.utility.XMLUtility;

public class XMLUser extends User{
	
	public XMLUser(Document xmlDocument) {	
		this.userID = XMLUtility.getString(xmlDocument, "userID");
		this.nickname = XMLUtility.getString(xmlDocument, "nickname");
		this.firstName = XMLUtility.getString(xmlDocument, "firstName");
		this.lastName = XMLUtility.getString(xmlDocument, "lastName");
		this.birthday = XMLUtility.getString(xmlDocument, "birthday");
		this.gender = XMLUtility.getString(xmlDocument, "gender");		
		this.mail = XMLUtility.getString(xmlDocument, "mail");
		this.blog = XMLUtility.getString(xmlDocument, "blog");
		this.interest = XMLUtility.getString(xmlDocument, "interest");
		this.avatarFilename = XMLUtility.getString(xmlDocument, "avatarFilename");
		this.online = Boolean.parseBoolean(XMLUtility.getString(xmlDocument, "onLine"));
	}


}
